feat: add direct debit mandates client#11
Merged
Merged
Conversation
IMonnifyCollectionsClient gains CreateMandateAsync, GetMandatesAsync,
DebitMandateAsync, GetMandateDebitStatusAsync, CancelMandateAsync, and
ListMandatesAsync. Sandbox-tested (create, retrieve, list, cancel)
against a real mandate, surfacing several real discrepancies with our
own docs: the reference field is mandateReference not
externalMandateReference, two undocumented fields (responseMessage,
schemeCode), an extra mandateStatus value (PENDING_AUTHORIZATION), and
a paging shape that omits first/numberOfElements/empty in practice.
DebitMandateAsync/GetMandateDebitStatusAsync remain unverified
end-to-end since that needs a real ACTIVE mandate, which requires
customer bank-transfer authorization we can't perform programmatically.
Added LenientStringJsonConverter: GetMandateDebitStatusAsync's
responseMessage is documented as a string but our own sample shows it
as {} on that specific endpoint - this reads either without throwing.
Those shipped in v0.2.0 (see release-please's own [0.2.0] section above) - keeping them under Unreleased was stale/duplicated.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
Adds direct debit mandate support to
IMonnifyCollectionsClient:CreateMandateAsync,GetMandatesAsync,DebitMandateAsync,GetMandateDebitStatusAsync,CancelMandateAsync, andListMandatesAsync.DebitMandateAsync/GetMandateDebitStatusAsyncremain unverified end-to-end - that needs a mandate inACTIVEstatus, which requires real customer bank-transfer authorization that can't be performed programmatically. Also addedLenientStringJsonConverter:GetMandateDebitStatusAsync'sresponseMessageis documented as a string but our own sample shows it as{}on that specific endpoint - this reads either shape without throwing.Also includes a small cleanup: dropped the now-redundant Cards entries from
CHANGELOG.md'sUnreleasedsection, since those shipped inv0.2.0and are already covered by release-please's own[0.2.0]section.Checklist
dotnet test)dotnet format --verify-no-changespassesCHANGELOG.mdupdated under[Unreleased]docs/COMPATIBILITY.mdupdated for any endpoint you implemented or changed